package com.alliky.home.ui.activity;

import android.os.Bundle;

import com.alliky.core.base.BaseActivity;
import com.alliky.core.global.Global;
import com.alliky.home.BR;
import com.alliky.home.R;
import com.alliky.home.databinding.ActivityHomeGoodsDetailsBinding;
import com.alliky.home.ui.viewmodel.HomeGoodsDetailsViewModel;

public class HomeGoodsDetailsActivity extends BaseActivity<ActivityHomeGoodsDetailsBinding, HomeGoodsDetailsViewModel> {

    @Override
    public int initContentView(Bundle savedInstanceState) {
        return R.layout.activity_home_goods_details;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public void initData() {
        super.initData();
        //通过binding拿到toolbar控件, 设置给Activity
        this.setSupportActionBar(binding.include.toolbar);
        //初始化标题
        mViewModel.initToolbar();

        String btnName = getIntent().getStringExtra(Global.KEY.USERNAME);

        binding.btn.setText(btnName);
    }
}